import 'package:flutter/material.dart';
import 'package:opene/app_theme.dart';
import 'package:opene/app_utils.dart';

class ShowDialogHint extends StatefulWidget {
  String hint;

  ShowDialogHint({this.hint});

  @override
  _DialogHintState createState() => _DialogHintState(hint: hint);
}

class _DialogHintState extends State<ShowDialogHint> {
  String hint;

  _DialogHintState({this.hint});

  @override
  Widget build(BuildContext context) {
    return Dialog(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(12.0),
      ),
      child: Padding(
        padding: const EdgeInsets.only(top: 15, left: 15, right: 15),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Text("Tips", style: MyAppTheme.title),
            SizedBox(height: 16.0),
            Text(Utils.getStringisEmpty(hint), style: MyAppTheme.text),
            SizedBox(height: 5.0),
            Row(
              children: <Widget>[
                Expanded(
                    flex: 1,
                    child: FlatButton(
                      child: Text(
                        'OK',
                        style: MyAppTheme.title,
                      ),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    )),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
